package com.example.big_event.pojo;

import com.example.big_event.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

@Data
public class Article {


    private Integer id ;//文章id
    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String title;//文章标题
    @NotEmpty
    private String content;//文章正文
    @URL
    private String coverImg;//文章封面
    @State
    private String state;//文章状态
    @NotNull
    private Integer categoryId;//文章分类id
    private Integer createUser;//创建人id
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//修改时间

}
